{%autoescape None%}
<div id="industry_exposure" style="width: 800px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var chartDom = document.getElementById('industry_exposure');
    var myChart = echarts.init(chartDom);
    var option;

    // 指定图表的配置项和数据
    option = {
        title: {
            text: '行业风格暴露'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                label: {
                    backgroundColor: '#6a7985'
                }
            }
        },
        legend: {
            data: ['金融', '周期', '成长', '消费', '医药']
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: {{ five_industry_exposure_document["date"] }}
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '金融',
                type: 'line',
                stack: '总量',
                areaStyle: {},
                emphasis: {
                    focus: 'series'
                },
                data: {{ five_industry_exposure_document["finance_beta"] }}
            },
            {
                name: '周期',
                type: 'line',
                stack: '总量',
                areaStyle: {},
                emphasis: {
                    focus: 'series'
                },
                data: {{ five_industry_exposure_document["period_beta"] }}
            },
            {
                name: '成长',
                type: 'line',
                stack: '总量',
                areaStyle: {},
                emphasis: {
                    focus: 'series'
                },
                data: {{ five_industry_exposure_document["growth_beta"] }}
            },
            {
                name: '消费',
                type: 'line',
                stack: '总量',
                areaStyle: {},
                emphasis: {
                    focus: 'series'
                },
                data: {{ five_industry_exposure_document["consume_beta"] }}
            },
            {
                name: '医药',
                type: 'line',
                stack: '总量',
                show: false,
                label: {
                    show: false,
                    position: 'top'
                },
                areaStyle: {},
                emphasis: {
                    focus: 'series'
                },
                data: {{ five_industry_exposure_document["medicine_beta"] }}
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>